<?php

/**
 * BbMatch form.
 *
 * @package    vogue
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class BbMatchForm extends BaseBbMatchForm
{
  public function configure()
  {	
      # VARIABLES
	    $years = range(2011, 2020);
	  
  	  unset($this['id'],$this['bonus1'],$this['bonus2'],$this['m_time']);
      # WIDGETS
      $this->widgetSchema['m_id']       = new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('BbMatchday'), 'add_empty' => true), array('style'=>'width:400px;height:24px;'));
      $this->widgetSchema['team1_id']       = new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('BbTeams'), 'add_empty' => true), array('style'=>'width:400px;height:24px;'));
      $this->widgetSchema['round1score1']       = new sfWidgetFormTextarea(array(), array('style'=>'width:40px; height:15px'));
      $this->widgetSchema['round2score1']       = new sfWidgetFormTextarea(array(), array('style'=>'width:40px; height:15px'));
      $this->widgetSchema['round3score1']       = new sfWidgetFormTextarea(array(), array('style'=>'width:40px; height:15px'));
      $this->widgetSchema['round4score1']       = new sfWidgetFormTextarea(array(), array('style'=>'width:40px; height:15px'));
      $this->widgetSchema['score1']       = new sfWidgetFormTextarea(array(), array('style'=>'width:40px; height:15px'));
	    $this->widgetSchema['team2_id']       = new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('BbTeams'), 'add_empty' => true), array('style'=>'width:400px;height:24px;'));	  
  	  $this->widgetSchema['round1score1']       = new sfWidgetFormTextarea(array(), array('style'=>'width:40px; height:15px'));
      $this->widgetSchema['round2score1']       = new sfWidgetFormTextarea(array(), array('style'=>'width:40px; height:15px'));
      $this->widgetSchema['round3score1']       = new sfWidgetFormTextarea(array(), array('style'=>'width:40px; height:15px'));
      $this->widgetSchema['round4score1']       = new sfWidgetFormTextarea(array(), array('style'=>'width:40px; height:15px'));      
	    $this->widgetSchema['score2']       = new sfWidgetFormTextarea(array(), array('style'=>'width:40px; height:15px'));
  	  $this->widgetSchema['match_descr'] =  new sfWidgetFormTextarea(array(), array('style'=>'width:400px;'));
      $this->widgetSchema['m_date']       = new sfWidgetFormDateTime();
  	  $this->widgetSchema['published']       = new sfWidgetFormInputCheckbox(array(), array('value'=>1));
  	  $this->widgetSchema['is_extra']       = new sfWidgetFormInputCheckbox(array(), array('value'=>1));
  	  $this->widgetSchema['m_played']       = new sfWidgetFormInputCheckbox(array(), array('value'=>1));
  	  $this->widgetSchema['m_location']       = new sfWidgetFormTextarea(array(), array('style'=>'width:200px; height:24px'));
  	  
      # VALIDATORS		              
      $required = 'Утга оруулна уу.';
      $this->validatorSchema['team1_id']  	    = new sfValidatorPass(); 	
      $this->validatorSchema['score1']  	    = new sfValidatorPass(); 	
      $this->validatorSchema['team2_id']  	    = new sfValidatorPass(); 	      
	    $this->validatorSchema['score2']  	    = new sfValidatorPass(); 	
      $this->validatorSchema['match_descr']  	    = new sfValidatorPass(); 	
     // $this->validatorSchema['m_date']  	    = new sfValidatorPass(); 	
      
      // LABELS      
      $this->widgetSchema->setLabel('m_id', 'Тоглолтын Өдөр');    
      $this->widgetSchema->setLabel('team1_id', 'Эзэн Баг');
      $this->widgetSchema->setLabel('round1score1', '1р үе ');
      $this->widgetSchema->setLabel('round2score1', '2р үе ');
      $this->widgetSchema->setLabel('round3score1', '3р үе ');
      $this->widgetSchema->setLabel('round4score1', '4р үе ');
      $this->widgetSchema->setLabel('score1', 'Оноо ');
	  $this->widgetSchema->setLabel('team2_id', 'Зочин Баг');
      $this->widgetSchema->setLabel('round1score2', '1р үе ');
      $this->widgetSchema->setLabel('round2score2', '2р үе ');
      $this->widgetSchema->setLabel('round3score2', '3р үе ');
      $this->widgetSchema->setLabel('round4score2', '4р үе ');
      $this->widgetSchema->setLabel('score2', 'Оноо ');
      $this->widgetSchema->setLabel('match_descr', 'Тоглолтын тайлбар');
      $this->widgetSchema->setLabel('m_date', 'Огноо');      
      $this->widgetSchema->setLabel('published', '');
      $this->widgetSchema->setLabel('is_extra', 'Нэмэлт Цагтай эсэх');
      $this->widgetSchema->setLabel('m_played', 'Тоголсон эсэх');
      $this->widgetSchema->setLabel('m_location', 'Заал');
  }  

}
